<template>
  <div class="detailShop">
    <div class="shopTitle">
      <img :src="shop.logo" />
      <span>{{shop.name}}</span>
    </div>
    <div class="center">
      <div class="shopNum">
        <div class="sell">
          <h3>{{simpleSell}}</h3>
          <span>总销量</span>
        </div>
        <div class="goodsNum">
          <h3>{{shop.goodsCount+'件'}}</h3>
          <span>全部宝贝</span>
        </div>
      </div>

      <div class="remark">
        <div v-for="i in shop.score">
          {{i.name}}
          <span :style="{color:i.isBetter?'orange':'#42B983'}">{{i.score}}</span>
          <span v-if="i.isBetter" class="high">高</span>
          <span v-else class="low">低</span>
        </div>
      </div>
    </div>
    <button class="enter">进店看看</button>

  </div>
</template>

<script>
  export default{
    name:'',
    data(){
      return {

       }
    },
    methods:{

    },
    components:{

    },
    computed:{
      simpleSell(){
        return (this.shop.sells/10000).toFixed(2)+'万'
      }
    },
    props:{
      shop:{
        type:Object,
        default(){
          return {}
        }
      }
    }
  }
</script>

<style scoped>
  .shopTitle{
    position: relative;
    margin: 10px;
  }
  .shopTitle img{
    margin-right: 5px;
  }
  .shopTitle img{
    width: 34px;
    height: 34px;
  }
  .shopTitle span{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }
  .center{
    display: flex;
    justify-content: space-evenly;
  }
  .shopNum>div{
    /* display: flex; */
    display: inline-block;
    vertical-align: middle;
    text-align: center;
  }
  .shopNum::after{
    content: '';
    font-size: 0;
    height: 100%;
    vertical-align: middle;
    display: inline-block;
  }
  .sell{
    margin-right: 15px;
  }
  .remark{
    border-left: 3px solid #C0C0C0;
  }
  .remark>div{
    margin: 5px;
  }
  .low{
    background-color: #42B983;
  }
  .high{
    background-color: orange;
  }
  .low,.high{
    float: right;
    margin-left: 30px;
    color: white;
  }

  .enter{
    border-radius:5px;
    margin: 0 auto;
    margin-top: 10px;
    display: block;
    width: 150px;
    height: 30px;
    color: #808080;
    background-color: #C0C0C0;
    border: none;
  }
</style>
